

#ifndef _SEEKFREE_ABSOLUTE_ENCODER_H
#define _SEEKFREE_ABSOLUTE_ENCODER_H


#include "main.h"
//#include "spi.h"



////------------------------硬件SPI--------------------------//


#define ABS_ENCODER_SPI_CSN(x) HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin,(GPIO_PinState)x)


//角度传感器参数
#define ABS_ENCODER_SPI_W       0x80
#define ABS_ENCODER_SPI_R       0x40


#define ZERO_L_REG              0x00
#define ZERO_H_REG              0x01
#define DIR_REG                 0X09

void   encoder_init_spi(void);
uint16_t encoder_angle_spi(void);


#endif

